package liangtWorkSpace.proxy.reflect;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @ClassName MyInvocationHandle
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/8 21:33
 */
public class MyInvocationHandle implements InvocationHandler {
    private Object object;

    public void setTraget(Object target){
        this.object = target;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        DogUtils.method1();
        method.invoke(object,args);
        DogUtils.method2();
        return null;
    }
}
